<template>
  <a-tabs v-model="tab" class="bg-white px-20 py-10">
    <a-tab-pane tab="车型维护" :key="1" v-if="$permissionJudge('VehicleTypeManage')">
      <ModelItem/>
    </a-tab-pane>
    <a-tab-pane tab="车型组维护" :key="2">
      <ModelGroupItem/>
    </a-tab-pane>
    <a-tab-pane tab="标签维护" :key="3" v-if="$permissionJudge('VehicleTagManage')">
      <TagMaintenance/>
    </a-tab-pane>
  </a-tabs>
</template>

<script>
  import ModelItem from './components/ModelItem'
  import ModelGroupItem from './components/ModelGroupItem'
  import TagMaintenance from './components/TagMaintenance'

  export default {
    name: 'Preservation',
    components: {
      ModelItem, ModelGroupItem, TagMaintenance
    },
    data() {
      return {
        tab: 1, // 当前选中的tab
      }
    },
    created(){
      this.tab=this.$permissionJudge('VehicleTypeManage')?1:2
    }
  }
</script>

<style scoped>

</style>